Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Setting Document Context to UTF-8
Feedback Type: Question
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Application Development
Platform: Windows
Release: 8.5.3
Reproducible: Always

We are trying to take in french characters into an agent that's receiving content from an HTTP POST. When we get the documentContext and grab the contents of the CGI REQUEST_CONTENT variable, the french characters are all messed up. The calling system has set the output stream to UTF-8, and when I rewrite the agent as a servlet and set the InputStreamReader to UTF-8, it works like a charm. However, we can't get the agent to receive the posted french data correctly.

We have tried the following:

Document xmlDoc = agentContext.getDocumentContext();
InputStream is = new ByteArrayInputStream(xmlDoc.getItemValueString("REQUEST_CONTENT").getBytes("UTF-8"));
BufferedReader in = new BufferedReader(new InputStreamReader(is));


and

Document xmlDoc = agentContext.getDocumentContext();
byte[] bytes = xmlDoc.getItemValueString("REQUEST_CONTENT").getBytes("UTF-8");
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
BufferedReader in = new BufferedReader(new InputStreamReader(bais));

Neither of these approaches have worked.

Is there a way to tell the session or agentContext to expect UTF-8?

Thanks,
Scott.


Feedback number WEBB9EJRE2 created by ~George Zekluvitchikle on 12/19/2013

Status: Open
Comments:

Setting Document Context to UTF-8 (~George Zekluvi... 19.Dec.13)
. . The problem is getItemValueString()... (~Ned Nimfanakon... 20.Dec.13)
. . . . Setting Document Context to UTF-8 (~George Zekluvi... 20.Dec.13)
. . . . . . read this (~Sean Eljumigon... 20.Dec.13)
. . . . . . . . All Set to UTF-8 (~George Zekluvi... 20.Dec.13)
. . . . . . . . . . Read this (~Sean Eljumigon... 20.Dec.13)
. . . . . . . . . . . . LMBCS Worked (~George Zekluvi... 20.Jan.14)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS